package cn.neusoft.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import java.io.Serializable;

/**
 * 员工类
 * @author hxj
 * @since 2023-12-19
 */
@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_employee")
public class Employee implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private String username;

    private String email;

    private String phone;

    private String salt;

    private String password;

    private String realName;

    private Integer age;

    private Integer state;

    private Long departmentId;

    private Long roleId;

    @TableField(exist = false)  //表示类之间关系的字段 设置exist = false
    private Department department;

    @TableField(exist = false)
    private Role role;
}
